package com.corpgovernment.supplier.converter;

import com.corpgovernment.api.organization.model.user.login.PtUserLoginType;
import com.corpgovernment.api.supplier.vo.AtUserLoginVo;
import com.corpgovernment.supplier.entity.db.AtUserLogin;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 *
 *
 * @author marco.zheng   (cq_zheng@trip.com)
 * @date 2023/2/3
 */
@Mapper
public interface AtUserLoginConverter {

    AtUserLoginConverter INSTANCE = Mappers.getMapper(AtUserLoginConverter.class);

    List<PtUserLoginType> convert(List<AtUserLogin> atUserLoginList);

    @Mapping(source = "userId", target = "uid")
    AtUserLoginVo convert(AtUserLogin atUserLogin);

}
